<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div id="content" class="col-lg-10 col-sm-10">
    <!-- content starts -->
    <div>
        <ul class="breadcrumb">
            <li>
                <a href="#">Home</a>
            </li>
            <li>
                <a href="#">View Result</a>
            </li>
        </ul>
    </div>

    <div class="row">
        <div class="box col-md-12">
            <div class="box-inner">
                <form  action="GoStudentFilterAction.do" method="post">

                    <div class="box-header well" data-original-title="">
                        <h2>Filter Criteria</h2>



                    </div>
                    <div class="box-content">
                        <div class="control-group">
                            <div class="controls">
                                <label class="control-label" for="selectError">Select Branch</label>

                                <select id="branch_select" name="branch" data-rel="chosen">
                                    <option value="-1">None</option>
                                    <c:forEach items="${applicationScope.allbranches}" var="branch">
                                        <option value="${branch.id}">${branch.name}</option>    
                                    </c:forEach>

                                </select> 
                                <br><br>
                                <label class="control-label" for="selectError">Select Semester</label>

                                <select id="semester_select" name="semester" data-rel="chosen">
                                    <option value="-1">None</option>
                                    <option>1</option>
                                    <option>2</option>
                                    <option>3</option>
                                    <option>4</option>
                                    <option>5</option>
                                    <option>6</option>
                                    <option>7</option>
                                    <option>8</option>


                                </select> 
                                <br><br>
                                <label class="control-label" for="selectError">Select Division</label>

                                <select id="division_select" name="division" data-rel="chosen">
                                    <option value="-1">None</option>
                                    

                                </select>
                                


                            </div>

                        </div>

                    </div>
                    
                    <p class="center col-md-5">
                        <input type="submit" class="btn btn-primary" value="GO">
                    </p>
                </form>
            </div>

        </div>
    </div>

    <div class="row">
        <div class="box col-md-12">
            <div class="box-inner">
                <div class="box-header well" data-original-title="">
                    <h2>Result </h2>

                    <div class="box-icon">
                       
                    </div>
                </div>
                <div class="box-content">
                    <table class="table">
                        <thead>
                            <tr>
                                <th>Student Id</th>
                                <th>Test Id</th>
                                <th>Status</th>
                                <th>Correct Answer</th>
                                <th>Wrong Answer</th>
                            </tr>
                        </thead>
                        <tbody>


                            <c:forEach items="${sessionScope.page_li_allresults}" var="result">
                                <tr id="tr_${result.id}">
                                    <td class="center" id="td_sid_${result.id}">${result.student.fname}</td>
                                    <td class="center" id="td_tid_${result.id}">${result.test.name}</td>
                                    <td class="center" id="td_status_${result.id}">${result.status}</td>
                                    <td class="center" id="td_canswer_${result.id}">${result.canswer}</td>
                                    <td class="center" id="td_wanswer_${result.id}">${result.wanswer}</td>
                                    <td class="center">
<!--                                        <a href="#myModal" class="btn-info btn-setting view_anchor" id="view_${result.id}" ><button class='label-success label label-default'>View</button></a>-->
<!--                                        <a href="EditStudentAction.do?id=${student.id}"><button class="label-success label label-default">Edit</button></a> 
                                        <button class="label-success label label-default delete_button" id="delete_${student.id}">Delete</button>-->
                                    </td>
                                </tr>
                            </c:forEach>

                        </tbody>
                    </table>
                    <ul class="pagination pagination-centered">

                        <c:forEach begin="1" end="${applicationScope.pagelink}" var="i">
                            <li class="active">
                                <a href="PageAction.do?pageid=<c:out value="${i}&action=result"></c:out>">${i}</a>
                                </li>
                        </c:forEach>


                    </ul>
                </div>
            </div>
        </div>
        <!--/span-->


        <!--/span-->
    </div>
</div>